package com.gov.dna.project.controller;

import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/view")
@AllArgsConstructor
public class HtmlController {


    @RequestMapping(value = "/to/{path}/{html}")
    public String index(@PathVariable("path") String path,@PathVariable("html") String html, Model model, HttpServletRequest req, HttpServletResponse res) {
        return path+"/"+html;
    }

    @RequestMapping(value = "/test")
    public String index(HttpServletRequest req, HttpServletResponse res) {
        return "index";
    }

}
